<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>PowerShell Landing Page</title>
    <link th:href="@{/static/bootstrap/5.3.2/css/bootstrap.min.css}" rel="stylesheet">
    <style>
        body {
            background-color: #000;
            color: #fff;
            font-family: 'Courier New', Courier, monospace;
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
            margin: 0;
        }
        .landing-container {
            background-color: #000;
            padding: 30px;
            border: 1px solid #0078d4;
            border-radius: 10px;
            box-shadow: 0 0 10px rgba(0, 120, 212, 0.5);
            width: 400px;
            text-align: center;
        }
        .landing-container h2 {
            margin-bottom: 20px;
            color: #0078d4;
        }
        .landing-container .form-group {
            margin-bottom: 15px;
        }
        .landing-container .btn-option {
            width: 100%;
            margin-bottom: 10px;
            background-color: #0078d4;
            border-color: #0078d4;
        }
        .landing-container .btn-option:hover {
            background-color: #005a9e;
            border-color: #005a9e;
        }
        .landing-container .error-message {
            color: red;
            font-size: 0.9em;
            margin-top: 10px;
        }
    </style>
</head>
<body>
    <div class="landing-container">
        <h2>Admin Landing Page</h2>
        <div class="form-group">
            <p>请选择您要访问的功能：</p>
            <button type="button" class="btn btn-option" id="shellButton">🎯Remote Powershell Admin</button>
            <button type="button" class="btn btn-option" id="fileButton">📁File Explorer &📄Log Viewer</button>
        </div>
        <div class="error-message" id="errorMessage"></div>
    </div>

    <script th:src="@{/static/jquery/3.7.1/jquery.min.js}"></script>
    <script th:src="@{/static/bootstrap/5.3.2/js/bootstrap.bundle.min.js}"></script>
    <script th:inline="javascript">
        $(document).ready(function() {
            const shellUrl = /*[[ @{/shell} ]]*/ '';
            const fileUrl = /*[[ @{/file} ]]*/ '';
            
            $('#shellButton').on('click', function() {
                window.open(shellUrl, '_blank');
            });
            
            $('#fileButton').on('click', function() {
                window.open(fileUrl, '_blank');
            });
        });
    </script>
</body>
</html>